var t = getApp();

Page({
    data: {
        listData: [],
        marketid: 0,
        amounts: 0,
        num: 0,
        titleName: "我的市场"
    },
    onLoad: function(t) {
        t.marketid && (this.data.marketid = t.marketid), this.getData(t.marketid);
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    getData: function(a) {
        var e = this, n = {};
        a && 0 != a && (this.setData({
            titleName: "下级市场"
        }), wx.setNavigationBarTitle({
            title: "下级市场"
        }), n.member_id = a);
        var i = t.getNetAddresss("plugin.regional-reward.Frontend.controllers.achievement.index");
        t._getNetWork({
            url: i,
            data: n,
            success: function(t) {
                var a = t.data;
                if (1 != a.result) return wx.showToast({
                    title: a.msg,
                    icon: "none"
                }), void setTimeout(function() {
                    wx.navigateBack();
                }, 1e3);
                e.setData({
                    listData: a.data.childs,
                    amounts: a.data.amounts,
                    num: a.data.num
                });
            }
        });
    },
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    getMoreData: function() {
        console.log("触发加载更多");
        var t = this.data.listData;
        this.setData({
            listData: t.concat(new Array(10))
        });
    },
    onShareAppMessage: function() {}
});